<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<meta name="layout" content="main">
</head>
<body id="body">
	<h1>Atualizar Base de Dados</h1>
	<br>
	<div name="meuDiv"> 
	        <table  align="center">
		        <tr>
		        	<td></td>
		        	<td>
		        	<g:hasErrors bean="${userInstance}">
            			<div class="ErrorMessage" align="center"><g:renderErrors bean="${userInstance}"  /></div>
            			<br>
        			</g:hasErrors>
		        	</td>
		        	<td></td>
		        </tr>
	        </table>
        </div>
     <g:if test="${flash.message}">
         <table class="Table" align="center">
				<tr align="center">
					<td>
							<div class="message" align="center">${flash.message}</div>
					</td>
				</tr>
				<tr align="center">
					<td>
							<div class="message" align="center">${flash.info}</div>
					</td>
				</tr>
				<tr align="center">
					<td>
							<g:link onClick="javascript:history.back()" class="Voltar"   id="back" >Voltar</g:link>
					</td>
				</tr>
			</table>
         <br>
     </g:if>
     <g:else>
     	<g:uploadForm action="upload">
			<table class="Table" align="center">
				<tr align="center">
					<td>
							<input type="file"  name="myFile" maxlength="100000" />
					</td>
				</tr>
				
				<tr align="center"> 
					<td> 
					<select name="torre" id="torre">
							<option>Selecione a torre</option>
							<g:each in="${torres}" var="torre">
								<option value="${torre}" >${torre} </option>
							</g:each>
						</select>
					
					</td>
				</tr>
				<tr align="center">
					<td>
							<input type="submit" value="Upload" />
					</td>
				</tr>
			</table>
		</g:uploadForm>
	</g:else>
	
	
</body>
</html>